#!/bin/sh
##This postflight script echoes the values of the available
# arguments and environmental variables.
#echo "Start preflight script"

rm ~/Library/Preferences/com.promethean.virtualvoteserver.plist

EXTENSION_PATH=/System/Library/Extensions/IOACTIV.kext
if [ ! -e "$EXTENSION_PATH" ]; then
	rm -r /System/Library/Extensions/IOACTIV.kext
	rm -r /System/Library/PreferencePanes/ACTIVboard.prefPane
	rm -r /System/Library/StartupItems/ACTIVstartup
	rm -r /Library/Receipts/ACTIVboard.pkg
	rm -r "/Applications/ACTIVboard Uninstall.app"
	rm /Users/Shared/ACTIVstartup.log
	rm /Users/Shared/Library/Preferences/com.Promethean.preferences.ACTIVboard.calibration

# VAD: Shared/Library/Preferebces folder will be removed if empty
	rmdir /Users/Shared/Library/Preferences

	rm -R "/System/Library/Contextual Menu Items/ACTIVboard CM.plugin"

#VAD: disabling if Jaguar
	if [ -e /System/Library/PreferencePanes/Ink.prefPane/Contents/MacOS ]; then
		cd /System/Library/PreferencePanes/Ink.prefPane/Contents
		mv -f .Info.old Info.plist
		rm ~/Library/Caches/com.apple.preferencepanes.cache
	fi
fi

exit 0